<?php
/**
 * 用户认证
 */

Route::group([], function (\Illuminate\Routing\Router $router) {

    //密码登录
    $router->post('login', 'AuthController@login');

    //用户注册
    $router->post('register', 'AuthController@register');

    //重置密码
    $router->post('resetPassword', 'AuthController@resetPassword');
});

Route::group([
    'middleware' => 'jwt.auth',
], function (\Illuminate\Routing\Router $router) {

    //重置密码
    $router->post('resetPassword', 'AuthController@resetPassword');

    //刷新用户token
    $router->post('refresh', 'AuthController@refresh');

    //退出登录
    $router->post('logout', 'AuthController@logout');

    //获取auth用户信息
    $router->post('me', 'AuthController@me');


});